<div class="content" layout-padding id="department_manager">
    <h1>
        部门管理
    </h1>

    <md-divider></md-divider>
    <div ng-if="loaddingListData" class="loadding" layout="column" layout-align="center center">
        <md-progress-circular class="md-hue-3" md-mode="indeterminate" md-diameter="150"></md-progress-circular>
        <div>
            正在加载，请稍等
        </div>
    </div>
    <div ng-if="!loaddingListData&&(!Departments||Departments.length==0)" class="loadding" layout="column"
         layout-align="center center">
        <div>
            无数据
        </div>
    </div>


    <md-list layout="column" layout-align="">
        <div ng-if="Departments&&Departments.length!=0" layout="row" class="">
            <h4 class="tabel-cell" flex>Id</h4>
            <h4 class="tabel-cell" flex>部门名称</h4>
            <h4 class="tabel-cell" flex>部门描述</h4>
            <h4 class="tabel-cell text-center" flex>操作</h4>
        </div>
        <md-list-item layout="row" ng-repeat="item in Departments" ng-hide="itemHide(item.id)" class="tabel-row">
            <span class="tabel-cell" flex="">{{item.id}}</span>
            <span class="tabel-cell" flex="">{{item.name}}</span>
            <span class="tabel-cell" flex="">{{item.description}}</span>
            <span class="tabel-cell text-left" flex="">
                <md-button ng-disabled="loadding(item.id)" class="md-warn"
                           ng-click="delete(item.id)">
                    <i class="fa fa-times"></i>删除
                </md-button>
                <md-button class="md-primary" ng-click="edit(item.id,item.name,item.description)">
                    <i class="fa fa-pencil-square-o"></i>编辑
                </md-button>
            </span>

        </md-list-item>

    </md-list>
    <md-divider></md-divider>
    <div layout="row" layout-align="center center">
        <md-button ng-disabled="loadMore||noNewData" class="md-raised md-primary" style="margin-top: 30px"
                   ng-click="loadMoreData()">
                <span flex ng-if="noNewData">没有更多数据了</span>
                <span flex ng-if="!noNewData">加载更多数据</span>
        </md-button>
    </div>
</div>
